home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 12 / Cream of the Crop 12 (Part II) / Cream of the Crop 12 (Part II).iso / BBS / WMCHAT1.ZIP / WMCHAT2.MOD < prev   
Encoding:
Text File  |  1996-03-13  |  10.8 KB  |  367 lines

  1. ┌───────────────────────────────────────────────────────────────────────────┐
  2. │ Mod Name: WMCHAT2.MOD                                                     │
  3. │ WWIV version: 4.24a                                                       │
  4. │ Difficulty: Medium.                                                       │
  5. │ Date: 3/7/96                                                              │
  6. │ Modifies: BBS.C, BBSUTL.C, BBSUTL1.C, COM.C, INSTMSG.C, LILO.C, MMENU.C,  │
  7. │           MULTINST.C, MAKEFILE.MAK, and VARS.H.                           │
  8. │ Author: Pug, 1@11750 (WWIVnet), 1@1 (IsleLink)                            │
  9. └───────────────────────────────────────────────────────────────────────────┘
  10.  
  11. Legend:
  12. .______________________.
  13. | == | Existing code   |
  14. | ++ | Add this line   |
  15. | -- | Remove this line|
  16. | =+ | Change this line|
  17. .----------------------.
  18.  
  19. Step 1:  BACK UP YOUR SOURCE CODE!
  20.  
  21. Step 2:  Get yourself a beer.
  22.  
  23. Step 3:  Open INSTMSG.C
  24.  
  25.          Make changes to handle_inst_msg():
  26.  
  27. ==        nln(2);
  28. ==        read_user(ih->from_user,&u);
  29. ++        if (in_chatroom) {
  30. ++          i=0;
  31. ++          nl();
  32. ++          while (i<ih->msg_size)
  33. ++            outchr(msg[i++]);
  34. ++          return(ih->main);
  35. ++        }
  36. ==        if (ih->main==INST_MSG_STRING)
  37. ==          npr("1%.12s (%d)0> 2",nam(&u,ih->from_user), ih->from_inst);
  38.  
  39.          Save INSTMSG.C
  40.  
  41. Step 4:  Open MULTINST.C
  42.  
  43.          Make changes to make_inst_str():
  44.  
  45. ==
  46. ++  d = wmchat_str;
  47. ==  get_inst_info(wi, &ir);
  48. ==  sprintf(s,"1%-3d",wi);
  49.  
  50.          Skipping down some...
  51.  
  52. ==    case INST_LOC_EVENT:
  53. ==      sprintf(s1,"%-25.25s",get_string(1216));
  54. ==      break;
  55. ++    case INST_LOC_CH1:
  56. ++      sprintf(s1,"%s1", get_stringx(4,55));
  57. ++      break;
  58. ++    case INST_LOC_CH2:
  59. ++      sprintf(s1,"%s2", get_stringx(4,55));
  60. ++      break;
  61. ++    case INST_LOC_CH3:
  62. ++      sprintf(s1,"%s3", get_stringx(4,55));
  63. ++      break;
  64. ++    case INST_LOC_CH4:
  65. ++      sprintf(s1,"%s4", get_stringx(4,55));
  66. ++      break;
  67. ++    case INST_LOC_CH5:
  68. ++      sprintf(s1,"%s5", get_stringx(4,55));
  69. ++      break;
  70. ++    case INST_LOC_CH6:
  71. ++      sprintf(s1,"%s6", get_stringx(4,55));
  72. ++      break;
  73. ++    case INST_LOC_CH7:
  74. ++      sprintf(s1,"%s7", get_stringx(4,55));
  75. ++      break;
  76. ++    case INST_LOC_CH8:
  77. ++      sprintf(s1,"%s8", get_stringx(4,55));
  78. ++      break; 
  79. ++    case INST_LOC_CH9:
  80. ++      sprintf(s1,"%s9", get_stringx(4,55));
  81. ++      break;
  82. ++    case INST_LOC_CH10:
  83. ++      sprintf(s1,"%s10", get_stringx(4,55));
  84. ++      break;
  85. ==    case INST_LOC_CHAT:
  86. ==      sprintf(s1,"%-25.25s",get_string(1218));
  87. ==      break;
  88.  
  89.          Save MULTINST.C
  90.  
  91. Step 5:  Open COM.C
  92.  
  93.          Locate and add the following code in nl();
  94.  
  95. ==  else
  96. ==    outstr("\r\n");
  97. --  if (inst_msg_waiting())
  98. ++  if (inst_msg_waiting() && !chatline)
  99. ==    process_inst_msgs();
  100. ==}
  101.  
  102.          Locate and add the following code in skey1():
  103.  
  104. ==      case 18:
  105. ==        if (echo)
  106. ==          reprint();
  107. ==        break;
  108. ++      case 12: /* CTRL - L */
  109. ++        if(so())
  110. ++        toggle_invis();
  111. ++        break;
  112. ++      case 14: /* CTRL - N */
  113. ++        toggle_avail();
  114. ++        break;
  115. ==      case 25:
  116.  
  117.          Locate and add the following code in input1():
  118.  
  119. ==  while (!done && !hangup) {
  120. ==    ch = getkey();
  121. ++    if(curpos) chatline=1;      
  122. ++    else chatline=0;
  123. ==    if (in_ansi) {
  124. ==      if ((in_ansi==1) && (ch!='['))
  125.  
  126.          Save COM.C
  127.  
  128. Step 6:  Open LILO.C
  129.  
  130.          In function logon(), make appropriate changes:
  131.  
  132. ==        prt(3,get_string(378));
  133. ==        nl();
  134. ==  }
  135. ++  if (((incom) || (sysop1())) && (thisuser.sl < 255)) {
  136. ++        sprintf(s, "%s %s", thisuser.name, get_string(1172));
  137. ++        broadcast(s);
  138. ++  }
  139. --  if ((incom) || (sysop1()))
  140. --        broadcast(get_string(1172));
  141. ==  setiia(90);
  142.  
  143.          Skipping down some...
  144.  
  145. ==  if (usernum>0) {
  146. ++    if (((incom) || (sysop1())) && (thisuser.sl < 255)) {
  147. ++        sprintf(s, "%s %s", thisuser.name, get_string(1173));
  148. ++        broadcast(s);
  149. ++    }
  150. --        if ((incom) || (sysop1()))
  151. --          broadcast(get_string(1173));
  152. ==  }
  153. ==  setiia(90);
  154.  
  155.          Save LILO.C
  156.  
  157. Step 7:  Open VARS.H
  158.  
  159.          Make appropriate changes:
  160.  
  161. == #include "os2lib.h"
  162. == #endif
  163. ==
  164. == #include "fcns.h"
  165. ++ #include "wmchat.h"
  166.  
  167.          Skipping down some..
  168.  
  169. == __EXTRN__ unsigned short com_speed, *csn_index, crc, *gat, modem_flag,
  170. ==                          modem_mode, modem_speed, net_sysnum, curloc, eflags;
  171. ==
  172. ++ __EXTRN__ ch_action *actions[MAX_NUM_ACT];
  173. ++
  174. ++ __EXTRN__ int in_chatroom, chatline, invis, num_act, avail, d, wmchat_str;
  175. ++
  176. == __EXTRN__ unsigned int subconfnum, dirconfnum;
  177.  
  178.          Save VARS.H
  179.  
  180. Step 8: Open BBSUTL1.C
  181.  
  182.          In function write_instance(), make the following changes:
  183.  
  184. ==  if (useron) {
  185. ==    cf |= INST_FLAGS_ONLINE;
  186. ++    if (invis) cf |= INST_FLAGS_INVIS;
  187. ==    if (!(thisuser.sysstatus & sysstatus_no_msgs)) {
  188.  
  189.          Skipping down some...
  190.  
  191. ==        case INST_LOC_EMAIL:
  192. ==        case INST_LOC_CHATROOM:
  193. ==        case INST_LOC_RMAIL:
  194. ++          if(avail) 
  195. ==          cf |= INST_FLAGS_MSG_AVAIL;
  196. ==          break;
  197. ++        default:
  198. ++          if ((loc >= INST_LOC_CH1) && (loc <= INST_LOC_CH10) && avail)
  199. ++          cf |= INST_FLAGS_MSG_AVAIL;
  200. ++          break;
  201. ==      }
  202. --    } else if (loc == INST_LOC_CHATROOM) {
  203. --      cf |= INST_FLAGS_MSG_AVAIL;
  204. ==    }
  205. ==    if (using_modem)
  206.  
  207.           Skipping down some...
  208.  
  209. ==      ti.flags |= flags;
  210. ==    }
  211. ==  }
  212. ==  
  213. ++    if((ti.flags & INST_FLAGS_INVIS) && (!invis)) {
  214. ++      cf = 0;
  215. ++      if (ti.flags & INST_FLAGS_ONLINE) cf |= INST_FLAGS_ONLINE;
  216. ++      if (ti.flags & INST_FLAGS_MSG_AVAIL) cf |= INST_FLAGS_MSG_AVAIL;
  217. ++      re_write = 1;
  218. ++    }
  219. ++
  220. ==  if (cf!=ti.flags) 
  221.  
  222.          Skipping down some more...
  223.  
  224. ==    re_write=1;
  225. ==    ti.loc=loc;
  226. ==  }
  227. ==
  228. ++  if((((ti.flags & INST_FLAGS_INVIS) && (!invis)) ||
  229. ++     ((!(ti.flags & INST_FLAGS_INVIS)) && (invis))) ||
  230. ++     (((ti.flags & INST_FLAGS_MSG_AVAIL) && (!avail)) ||
  231. ++     ((!(ti.flags & INST_FLAGS_MSG_AVAIL)) && (avail))) &&
  232. ++     (ti.loc!=INST_LOC_WFC)) re_write=1;
  233. ++
  234. ==  if (re_write) {
  235.  
  236.          Save BBSUTL1.C
  237.  
  238. Step 9 Open UTILITY.C
  239.  
  240.          Locate this code in giveup_timeslice(), add marked line:
  241.  
  242. ==    /* delay(17); */
  243. ==  }
  244. ==#endif
  245. ++  if ((!in_chatroom) || (!chatline)) 
  246. ==  if (inst_msg_waiting())
  247. ==    process_inst_msgs();
  248.  
  249.          Save UTILITY.C
  250.  
  251. Step 10: Open MAKEFILE.MAK
  252.  
  253.          If you are using BORLAND C++, make the following changes.
  254.          Otherwise proceed down to the instructions for Turbo C++.
  255.  
  256. == BBS_OVL = \
  257. ==         batch.obj    bbsovl1.obj  bbsovl2.obj  bbsovl3.obj  \
  258. ==         chnedit.obj  conf.obj     defaults.obj diredit.obj  \
  259. ==         extrn1.obj   gfiles.obj   gfledit.obj  ini.obj      \
  260. ==         instmsg.obj  lilo.obj     misccmd.obj  multinst.obj \
  261. ==         multmail.obj netsup.obj   newuser.obj  qwk.obj      \
  262. ==         qwk1.obj     readmail.obj ripovl.obj   sr.obj       \
  263. ==         srrcv.obj    srsend.obj   subedit.obj  subreq.obj   \
  264. ==         subxtr.obj   sysopf.obj   tedit.obj    uedit.obj    \
  265. ==         voteedit.obj xferovl.obj  xferovl2.obj xfertmp.obj  \
  266. --         xinit.obj
  267. ++         xinit.obj    wmchat.obj
  268. ==
  269. == BBS_O_OVL = \
  270. ==         $(OBJ)\batch.obj    $(OBJ)\bbsovl1.obj  $(OBJ)\bbsovl2.obj  \
  271. ==         $(OBJ)\bbsovl3.obj  $(OBJ)\chnedit.obj  $(OBJ)\conf.obj     \
  272. ==         $(OBJ)\defaults.obj $(OBJ)\diredit.obj  $(OBJ)\extrn1.obj   \
  273. ==         $(OBJ)\gfiles.obj   $(OBJ)\gfledit.obj  $(OBJ)\ini.obj      \
  274. ==         $(OBJ)\instmsg.obj  $(OBJ)\lilo.obj     $(OBJ)\misccmd.obj  \
  275. ==         $(OBJ)\multinst.obj $(OBJ)\multmail.obj $(OBJ)\netsup.obj   \
  276. ==         $(OBJ)\newuser.obj  $(OBJ)\qwk.obj      $(OBJ)\qwk1.obj     \
  277. ==         $(OBJ)\readmail.obj $(OBJ)\ripovl.obj   $(OBJ)\sr.obj       \
  278. ==         $(OBJ)\srrcv.obj    $(OBJ)\srsend.obj   $(OBJ)\subedit.obj  \
  279. ==         $(OBJ)\subreq.obj   $(OBJ)\subxtr.obj   $(OBJ)\sysopf.obj   \
  280. ==         $(OBJ)\tedit.obj    $(OBJ)\uedit.obj    $(OBJ)\voteedit.obj \
  281. ==         $(OBJ)\xferovl.obj  $(OBJ)\xferovl2.obj $(OBJ)\xfertmp.obj  \
  282. --         $(OBJ)\xinit.obj
  283. ++         $(OBJ)\xinit.obj    $(OBJ)\wmchat.obj
  284.  
  285.           If you are using TURBO C++, make following changes.  Otherwise
  286.           Save MAKEFILE.MAK and proceed to step 11.
  287.  
  288. == BBS_OVL = \
  289. ==        $(OBJ)newuser.obj $(OBJ)sysopf.obj $(OBJ)voteedit.obj\
  290. ==        $(OBJ)gfledit.obj $(OBJ)tedit.obj $(OBJ)chnedit.obj\
  291. ==        $(OBJ)uedit.obj $(OBJ)diredit.obj $(OBJ)subedit.obj\
  292. ==        $(OBJ)xferovl.obj $(OBJ)multmail.obj $(OBJ)gfiles.obj\
  293. ==        $(OBJ)defaults.obj $(OBJ)misccmd.obj $(OBJ)xinit.obj\
  294. ==        $(OBJ)xfertmp.obj $(OBJ)batch.obj $(OBJ)srrcv.obj\
  295. ==        $(OBJ)srsend.obj $(OBJ)lilo.obj $(OBJ)subreq.obj\
  296. ==        $(OBJ)netsup.obj $(OBJ)subxtr.obj $(OBJ)multinst.obj\
  297. ==        $(OBJ)conf.obj $(OBJ)readmail.obj $(OBJ)instmsg.obj\
  298. ==        $(OBJ)bbsovl1.obj $(OBJ)extrn1.obj $(OBJ)bbsovl2.obj\
  299. ==        $(OBJ)sr.obj $(OBJ)ini.obj $(OBJ)xferovl2.obj\
  300. ==        $(OBJ)bbsovl3.obj $(OBJ)qwk.obj $(OBJ)qwk1.obj\
  301. --        $(OBJ)ripovl.obj
  302. ++        $(OBJ)ripovl.obj $(OBJ)wmchat.obj
  303.  
  304.           Skipping down some...
  305.  
  306. == $(OBJ)qwk1.obj    : qwk1.c     vars.h vardec.h net.h
  307. ==   $(TCC_OVL)
  308. == $(OBJ)ripovl.obj  : ripovl.c vars.h vardec.h net.h
  309. ==   $(TCC_OVL)
  310. ++ $(OBJ)wmchat.obj  : wmchat.h
  311. ++   $(TCC_OVL)
  312.  
  313.           Save MAKEFILE.MAK
  314.  
  315. Step 11:  Open MMENU.C
  316.  
  317.           Make appropriate changes to mainmenu()
  318.  
  319. ==      extern_prog(s1, sysinfo.spawn_opts[8]);
  320. ==    } else
  321. --    chat_room();
  322. ++    wmchat();
  323. ==  }
  324. ==  if (strcmp(s,"/Z")==0) {
  325.  
  326. Step 12:  Open BBSUTL.C
  327.  
  328.           Add the marked line to set_language_1():
  329.  
  330. ==  set_strings_fn(2, languagedir, "YES.STR", 0);
  331. ==  set_strings_fn(3, languagedir, "NO.STR", 0);
  332. ++  set_strings_fn(wmchat_str, languagedir, "WMCHAT.STR", 0);
  333.  
  334.           Save BBSUTL.C
  335.  
  336. Step 13:  Open BBS.C
  337.  
  338.           Add this line in function main():
  339.  
  340. ==  } else {
  341. ==    instance=1;
  342. ==  }
  343. ++  set_wmstr();
  344. ==  already_on=0;
  345. ==  endday=0;
  346. ==  oklevel=0;
  347.  
  348.           Save BBS.C
  349.  
  350. Step 14:  Copy WMCHAT.OBJ into your OBJ directory (normally in a
  351.           sub-directory of your source code's directory.)
  352.  
  353. Step 15:  Copy WMCHAT.H to your source code directory.
  354.  
  355. Step 16:  Copy WMCHAT.INI to your WWIV BBS directory.
  356.  
  357. Step 17:  Copy WMCHAT.STR to your BBS language directory (usually GFILES).
  358.           If you use multiple languages, be sure to copy WMCHAT.STR to ALL
  359.           the directories.
  360.  
  361. Step 18:  Copy WMCHAT.ANS and WMCHAT.MSG into your GFILES directory.
  362.  
  363. Step 19:  Recompile!
  364.  
  365.           A tip -- you no longer need the internal WWIV chatroom, you may
  366.           wish to delete it to save memory.
  367.